package dk.twu.analyzer.model;

import java.io.Serializable;

/**
 * Created by TW on 12/13/2014.
 */
public class Symbol implements Serializable {
    private final String code;
    private final String name;
    private final Exchange exchange;

    public Symbol(String code, String name, Exchange exchange) {
        this.code = code;
        this.name = name;
        this.exchange = exchange;
    }

    public String getCode() {
        return code + "." + exchange.getCode();
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return code +
                ":" + name +
                ":" + exchange.getCode();
    }

    public Exchange getExchange() {
        return exchange;
    }

}
